package com.example.film.mapper;

import com.example.film.entity.Top250Film;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface Top250FilmMapper {
    //top250电影table-->fillingcompany
    //查找top250电影信息
    @Select("select rank,name,director,link,picture,filmYear,country,type,score,brief from top250film")
    List<Top250Film> findTop250Film();
    //分页查询top250电影信息
    @Select("SELECT rank,name,director,link,picture,filmYear,country,type,score,brief FROM top250film LIMIT #{pageSize} OFFSET #{startIndex}")
    List<Top250Film> findTop250FilmInfo(@Param("startIndex") Integer startIndex, @Param("pageSize") Integer pageSize);
}